<template>
  <SearchNavBar :name="searchDetailList[0].name" />
  <div>{{ searchDetailList[0].name }}</div>
</template>
<script setup>
import { ref, computed, watch } from "vue";
import { useSearchStore } from "@/store/search";
import { useRouter } from "vue-router";
import SearchNavBar from "@/pages/Search/SearchNavBar/index.vue";

const searchStore = useSearchStore();
const router = useRouter();
console.log(router.currentRoute.value.params.id);
const searchDetailList = computed(
  () =>
    searchStore.searchList.searchList &&
    searchStore.searchList.searchList.filter(
      (item, index) => item.id == router.currentRoute.value.params.id
    )
);
// console.log(searchStore.counter);
</script>

<style>
</style>